-
-
Notifications
You must be signed in to change notification settings - Fork 317
feat(version): add --tag for version command #1819
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
commitizen/commands/version.py
Outdated
| if ( | ||
| self.arguments.get("major") | ||
| or self.arguments.get("minor") | ||
| or self.arguments.get("tag") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I prefer to have a separated error message.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, It make sense! I will do it in 1 or 2 days. Thanks!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have modify error handing for --major, --minor and --tag tag. Please take a look. Thanks!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I meant it makes less sense to let --tag share the warning message with the existing major and minor version warning message. I'd suggest you to revert --major, --minor related changes and add a separated --tag warning message.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Got you. Only implemented --tag function and leave --major and --minor unchanged!
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #1819 +/- ##
=======================================
Coverage 97.96% 97.96%
=======================================
Files 60 60
Lines 2648 2653 +5
=======================================
+ Hits 2594 2599 +5
Misses 54 54 ☔ View full report in Codecov by Sentry. |
6e98f8e to
c366400
Compare
Description
Add --tag flag to
cz versioncommand to output version withconfigured tag_format applied (e.g., v1.2.3 instead of 1.2.3).
Closes #1765
Checklist
Code Changes
uv run poe alllocally to ensure this change passes linter check and testsSteps to Test This Pull Request
Additional Context